/**
 * Created by Administrator on 2017/3/21.
 */
import React, {Component,Fragment} from 'react';
import {Form, Input,  Radio, Select,Upload,Button ,DatePicker,TreeSelect } from 'antd';
import {connect} from 'dva';
import moment from 'moment'
const TreeNode = TreeSelect.TreeNode;
const FormItem = Form.Item;
class AddPoliciesForm extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  componentDidMount() {
  }
  renderTreeNodes=(data)=>{
  }
  render() {
    const formItemLayoutWithLabel = {
      labelCol: {
        xs: {span: 24},
        sm: {span: 7},
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 14},
      }
    };

    const {getFieldDecorator} = this.props.form;
    const data=this.props.data
    return (
      <div>
        <Form onSubmit={this.handleSubmit}>
          {
            this.props.type==='管点编号'&&
              <Fragment>
                <FormItem
                  {...formItemLayoutWithLabel}
                  label={(
                    <span>
             原管点编号
            </span>
                  )}
                >
                  {getFieldDecorator('old', {
                    initialValue: this.props.old ,
                  })(
                    <Input disabled/>
                  )}
                </FormItem>
                <FormItem
                  {...formItemLayoutWithLabel}
                  label={(
                    <span>
             新管点编号
            </span>
                  )}
                >
                  {getFieldDecorator('new', {
                    initialValue:'',
                  })(
                    <Input/>
                  )}
                </FormItem>
              </Fragment>
          }

        </Form>
      </div>
    );
  }
}

const AddPoliciesFormWrap = Form.create()(AddPoliciesForm);
export default connect()(AddPoliciesFormWrap);
